package online.foxnull2.foxmall.search.vo;

import lombok.Data;
import lombok.experimental.Accessors;
import online.foxnull2.common.to.es.SkuEsModel;

import java.util.ArrayList;
import java.util.List;

@Data
@Accessors(chain = true)
public class SearchResult {

    private List<SkuEsModel> products;

    private Integer pageNum;

    private Long total;

    private Integer totalPages;

    private List<Brand> brands;

    private List<Category> categories;

    private List<Attr> attrs;


    private List<Nav> navs = new ArrayList<>();

    private List<Long> attrIds = new ArrayList<>();

    @Data
    @Accessors(chain = true)
    public static class Nav {
        private String name;
        private String value;
        private String link;
    }

    @Data
    @Accessors(chain = true)
    public static class Brand {

        private Long brandId;

        private String brandName;

        private String brandImg;

    }

    @Data
    @Accessors(chain = true)
    public static class Category {

        private Long categoryId;

        private String categoryName;

    }

    @Data
    @Accessors(chain = true)
    public static class Attr {

        private Long attrId;

        private String attrName;

        private List<String> attrValue;

    }

}
